import React from 'react';
import { Menu } from 'antd';
import {
  HomeOutlined,
  BookOutlined,
  ToolOutlined,
  UserOutlined,
  BankOutlined,
  MoneyCollectOutlined
} from '@ant-design/icons';

const { SubMenu } = Menu;

const SidebarMenu = ({ selectedKeys = [], openKeys = [], onMenuClick }) => (
  <div style={{
    width: 220,
    height: '100vh',
    background: '#3b5b7e',
    color: '#fff',
    boxShadow: '2px 0 8px rgba(0,0,0,0.08)'
  }}>
    <div style={{
      height: 56,
      background: '#228be6',
      display: 'flex',
      alignItems: 'center',
      paddingLeft: 18,
      fontWeight: 700,
      fontSize: 18,
      color: '#fff'
    }}>
      <HomeOutlined style={{ marginRight: 10, fontSize: 20 }} />
      运营总览
    </div>
    <Menu
      mode="inline"
      selectedKeys={selectedKeys}
      defaultOpenKeys={openKeys}
      style={{
        background: 'transparent',
        color: '#fff',
        borderRight: 0,
        fontSize: 16,
        fontWeight: 500,
        marginTop: 8
      }}
      theme="dark"
      onClick={onMenuClick}
    >
      <SubMenu key="content" icon={<BookOutlined />} title="内容管理">
        <Menu.Item key="content-1">文章发布管理</Menu.Item>
        <Menu.Item key="content-2">内容评论管理</Menu.Item>
      </SubMenu>
      <SubMenu key="business" icon={<ToolOutlined />} title="招商管理">
        <Menu.Item key="business-1">合同签订管理</Menu.Item>
        <Menu.Item key="business-2">客户信息管理</Menu.Item>
      </SubMenu>
      <SubMenu key="tenant" icon={<UserOutlined />} title="租户管理">
        <Menu.Item key="tenant-1">租户信息管理</Menu.Item>
        <Menu.Item key="tenant-2">租户人员管理</Menu.Item>
      </SubMenu>
      <SubMenu key="asset" icon={<BankOutlined />} title="资产管理">
        <Menu.Item key="asset-1">楼宇信息管理</Menu.Item>
        <Menu.Item key="asset-2">公共资源管理</Menu.Item>
      </SubMenu>
      <SubMenu key="bill" icon={<MoneyCollectOutlined />} title="账单管理">
        <Menu.Item key="bill-1">车辆收费账单</Menu.Item>
        <Menu.Item key="bill-2">租户账单管理</Menu.Item>
      </SubMenu>
    </Menu>
  </div>
);

export default SidebarMenu; 